package com.yboot.starter.mybatis.config;

import com.yboot.starter.mybatis.core.validator.DefaultTableIndexValidatorApi;
import com.yboot.starter.mybatis.core.validator.TableIndexValidatorApi;
import org.apache.ibatis.session.SqlSession;
import org.springdoc.core.providers.JavadocProvider;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置类
 *
 * @author yangcs
 * @date 2025/8/15
 */
@Configuration
@EnableConfigurationProperties(BaseColumnProperties.class)
public class MybatisPlusAutoMissBeanConfiguration {

    @Bean
    public TableIndexValidatorApi tableIndexValidatorApi(SqlSession sqlSession, JavadocProvider javadocProvider) {
        return new DefaultTableIndexValidatorApi(sqlSession, javadocProvider);
    }
}
